<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 表单上可以写method -->
    <form action="http://ajax-api.itheima.net/api/data" method="post">
        <!-- name属性加上之后，就可以设置属性名 -->
        <input name="username" type="text"  placeholder="请输入用户名" />
        <br /> 
        <input name="food" type="text" placeholder="请输入喜欢的食物" />
        <br />
        <input name="sign" type="textarea" placeholder="请输入个性签名" />
        <br />
        <!-- 表单里面，按钮，如果不写type，默认是type是submit -->
        <button>提交</button>
        <input type="submit">
      </form>
      <script>
        // const form = document.querySelector('form')
        // form.addEventListener('submit', function(e){
        //     e.preventDefault()
        // })
      </script>
</body>
</html>